From 43f5e6a6e6d257c11421ccdb6f3643688759a937 Mon Sep 17 00:00:00 2001 From: John Marshall Date: Sat, 19 May 2018 11:38:18 +0100 Subject: [PATCH] Meson build: improve doc generation --- docs/graphics/meson.build | 34 +++++++++++++++++++++++++--------- docs/meson.build | 7 +++++-- 2 files changed, 30 insertions(+), 11 deletions(-) diff --git a/docs/graphics/meson.build b/docs/graphics/meson.build index e7fe9f7..70cd9ab 100644 --- a/docs/graphics/meson.build +++ b/docs/graphics/meson.build @@ -1,13 +1,28 @@ graphic_files = [ - 'babl-16x16', - 'babl-48x48', - 'babl-a4poster', + 'babl-16x16.svg', + 'babl-48x48.svg', + 'babl-a4poster.svg', ] -graphic_files_install = [ - files('index.html'), -] +graphic_files_install = [] + +# Dummy config to copy index.html to build +graphic_files_install += configure_file( + input: 'index.html', + output: '@PLAINNAME@', + configuration: configuration_data() +) + + +foreach file : graphic_files + # Dummy config to copy svg files to build + graphic_files_install += configure_file( + input: file, + output: '@PLAINNAME@', + configuration: configuration_data() + ) +endforeach if rsvg_convert_bin.found() foreach file : graphic_files @@ -17,9 +32,10 @@ if rsvg_convert_bin.found() : [] ) - graphic_files_install += custom_target(file, - input : [ file + '.svg' ], - output: [ file + '.png' ], + graphic_files_install += custom_target( + file, + input: file, + output: '@BASENAME@.png', command: [ rsvg_convert_bin, sizeinfo, diff --git a/docs/meson.build b/docs/meson.build index 1c33c44..03a38c9 100644 --- a/docs/meson.build +++ b/docs/meson.build @@ -5,8 +5,6 @@ location= 'public_html/babl' scptarget = host + ':' + location + '/' -babl_css = files('babl.css') - xml_insert = find_program(join_paths('tools', 'xml_insert.sh')) index_static_html = configure_file( @@ -15,6 +13,10 @@ index_static_html = configure_file( configuration: conf, ) +babl_css = configure_file(input : 'babl.css', + output : 'babl.css', + configuration : configuration_data()) + index_html_tmp = custom_target('index.html.tmp', input : [ babl_html_dump, ], output: [ 'index.html.tmp', ], @@ -43,6 +45,7 @@ index_html = custom_target('index.html', '&&', xml_insert, '@OUTPUT@', 'TODO', '@INPUT3@', '&&', xml_insert, '@OUTPUT@', 'NEWS', '@INPUT4@', ], + build_by_default: true, ) -- 2.30.2